public class Text6 {
    public static void main(String[] args) {
        //int[] arr={2,2,1};
        int[] arr2={4,1,2,1,2};
        //int ret = fun(arr);
        int ret = fun(arr2);
        if(ret != -1){
            System.out.println(arr2[ret]);
        }else{
            System.out.println("wy=");
        }

       /* System.out.println(ret);
        System.out.println(ret2);*/
    }
   /* public static int fun(int[] arr) {
        int n = 0;
        for (int i = 0; i < arr.length; i++) {
            n = n^arr[i];
        }
        return n;
    }*/

    public static int fun(int[] arr){
        for (int i = 0; i < arr.length; i++) {
            int count = 0;
            for (int j = 0; j<arr.length; j++) {
                if(arr[i]==arr[j]){
                    count++;
                }
            }
            if(count==1){
                return i;
            }
        }
        return -1;
    }

}
